package io.github.wanggit.website.demos.zipkin_service_1.service.impl;

import io.github.wanggit.website.demos.zipkin_service_1.dao.StudentRepository;
import io.github.wanggit.website.demos.zipkin_service_1.domain.Student;
import io.github.wanggit.website.demos.zipkin_service_1.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class StudentServiceImpl implements StudentService {

    @Autowired
    private StudentRepository studentRepository;

    @Override
    public List<Student> listStudents(){
        return studentRepository.findAll();
    }

}
